<template>
  <div class="bottom-bar">
    <div class="bottom-left">
      <div class="left-item">
        <i class="iconfont icon-icon052"></i>
        <p>客服</p>
      </div>
      <div class="left-item">
        <i class="iconfont icon-dianpu-"></i>
        <p>店铺</p>
      </div>
      <div class="left-item">
        <i class="iconfont icon-shoucang"></i>
        <p>收藏</p>
      </div>
    </div>
    <div class="bottom-right">
      <span class="addCart" @click="addCart">加入购物车</span>
      <span class="buy">购买</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailBottomBar",
  methods: {
    addCart() {
      this.$emit('addCart')
    }
  }
}
</script>

<style scoped>
  .bottom-bar {
    display: flex;
    height: 49px;
    position: relative;
    bottom: 49px;
    background-color: #fff;
    z-index: 50;
  }
  .bottom-left {
    flex: 1;
    display: flex;
    justify-content: center;
  }
  .left-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .left-item i {
    font-size: 20px;
  }
  .left-item p {
    margin-top: 4px;
    font-size: 15px;
  }
  .bottom-right {
    flex: 1;
  }
  .bottom-right span {
    display: inline-block;
    width: 50%;
    height: 100%;
    text-align: center;
    line-height: 49px;
    font-size: 16px;
    cursor: pointer;
  }
  .addCart {
    background-color: yellow;
  }
  .buy {
    background-color: deeppink;
    color: #fff;
  }
</style>
